package com.projectnection.server.webservices;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.repackaged.org.json.JSONObject;
import com.projectnection.server.database.entities.GetEntity;

@SuppressWarnings("serial")
public class GetEntityServlet extends HttpServlet {

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws IOException {

		String entityID = request.getParameter("entityID");

		JSONObject entity = GetEntity.jsonEntity(entityID);

		response.setContentType("text/plain");
		response.getWriter().println(entity);
	}
}
